﻿<!DOCTYPE html>
<html>
<head>
    <title>@ViewBag.Title - SrumTracker</title>
    <link type="text/css" rel="stylesheet" href="http://yui.yahooapis.com/3.3.0/build/cssreset/reset-min.css" />
    <link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/themes/ui-lightness/jquery-ui.css" />
    <link href="@Url.Content("~/Content/Site2.css")" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $('.button').button();

            $('#products').change(function () {
                var val = $(this).val();
                if (val != "") {
                    window.location = '@(Url.Content("~"))products/' + val;
                }
            });

            $('.notice').hide().slideDown('fast').delay(2000).slideUp('fast');
        });
    </script>
    @RenderSection("head", false)
</head>
<body class="ui-widget-content" style="border: none; margin: 0;">
    <div class="ui-widget ui-widget-content ui-corner-all" style="border: none; padding: 0; margin: 0;">
        <div class="ui-widget-header ui-corner-all" style="border-top: none; border-right: none; border-left: none; padding: .5em;">
            <a href="@Url.Content("~")" style="">ScrumTracker</a>
            <select id="products" style="margin-left: 0em;">
                <option value="" label="Select product..." />
                @foreach (var product in SessionHelper.Products)
                {
                    <option class="product" label="@product.Name" value="@product.ProductId" @(product.ProductId == SessionHelper.CurrentProductId ? "selected=\"selected\"" : "") />
                }
            </select>
            <a href="@Url.Action("new", "products")">new product</a>
            <a href="@Url.Action("list", "users")">manage users</a>
            <div style="clear: both;">
            </div>
        </div>
        @foreach (var obj in TempData.Where(td => td.Key == "notice"))
        {
            <div class="notice ui-widget-content ui-corner-all ui-state-highlight">@obj.Value</div>
        }
        <div class="ui-widget-content ui-corner-all clear-background" style="margin-top: .4em; padding: .5em; background: none;">
            @RenderBody()
        </div>
    </div>
</body>
</html>
